package cn.bdqn.test;

import java.util.Scanner;

import cn.bdqn.dao.impl.PetOwnerDaoImpl;
import cn.bdqn.entity.PetOwner;

public class ExerciseTwo {

	public static void main(String[] args) throws Exception {

		//123
        System.out.println("主人登录功能");
        Scanner scanner = new Scanner(System.in);
        System.out.println("请输入主人用户名: ");
        String name = scanner.next();
        System.out.println("请输入主人密码: ");
        String password = scanner.next();
        PetOwnerDaoImpl petOwnerDaoImpl =  new PetOwnerDaoImpl();
        PetOwner petOwner =  petOwnerDaoImpl.queryPetOwnerByLogin(name, password);
        if(petOwner != null){
            System.out.println("登录成功");
            System.out.println("姓名: " + petOwner.getName());
            System.out.println("姓名: " + petOwner.getMoney());
        }else{
            System.out.println("用户名或密码不对");
        }


        System.out.println("商店登录功能");

    }
	
}
